package net.wanho.controller;

import net.wanho.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Author：汤小洋
 * Date：2023-12-21 15:40
 * Description：<描述>
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/add")
    public String addUser(@Valid User user){ // @Valid注解表示开启对User对象的数据校验
        System.out.println(user);
        return "success";
    }





}
